namespace CGF
{
    public partial class PanelPrivacy : UIComponentBase, IAwake<UILayer, bool>, IDestroy
    {
        public static void Open()
        {
            UIManagerComponent.instance.OpenUI<PanelPrivacy>(UILayer.Normal, RootComponent.instance, false);
        }

        public static void Close()
        {
            UIManagerComponent.instance.CloseUI<PanelPrivacy>();
        }

        public async void Awake(UILayer layer, bool isFloat)
        {
            await SpawnPrefab("Prefabs/GameUI/PanelPrivacy", layer, isFloat);
			BindProperties(transform);
            
            BtnBack.SetClick(Close);
            
            Text_CN.gameObject.SetActive(I18N.CurrLanguage == ELanguage.ZH_CN);
            Text_EN.gameObject.SetActive(I18N.CurrLanguage == ELanguage.EN_US);
            Text_BR.gameObject.SetActive(I18N.CurrLanguage == ELanguage.PT_BR);
            Text_VN.gameObject.SetActive(I18N.CurrLanguage == ELanguage.VI_VN);
        }

        public override void OnDestroy()
        {
            base.OnDestroy();
        }

    }
}
